﻿using System.Collections.Generic;
using System.Globalization;
using System.Linq;

namespace Myotragus.Store.Models
{
  public class CultureProvider
  {
    public static IEnumerable<string> LstCultureNames = new[] { "es", "en", "it" };

    public static IDictionary<string, CultureInfo> DicCultures = LstCultureNames
      .Concat(LstCultureNames.Select(c => c.ToUpper()))
      .ToDictionary(c => c, c => CultureInfo.GetCultureInfo(c));

   public static int GetLcId(string cultureName)
    {
      return DicCultures[cultureName].LCID;
    }
  }

  public class CultureSelection
  {
    public string Controller { get; set; }
    public string Action { get; set; }
    public string CultureParameterName { get; set; }
    public IDictionary<string, object> RouteValues { get; set; }
  }
}